package com.cai.service;

import com.cai.common.result.ResultVO;
import com.cai.entity.DO.User;
import com.cai.entity.DTO.UserLoginParams;

import javax.servlet.http.HttpServletRequest;

/**
 * @Title: UserService
 * @Author RuoLi
 * @Package com.cai.service
 * @Date 2024/1/12 10:20
 * @description: 用户业务
 */
public interface UserService {
    /**
     * 登录
     */
    ResultVO login(UserLoginParams params, HttpServletRequest request);

    /**
     * 退出登录
     */
    void logout(HttpServletRequest request);

    /**
     * 根据用户账号获取用户信息
     */

    User getUserByUsername(String username);

    /**
     * 根据账号获取用户角色
     */
    String getRoleByUsername(String username);
}
